
<!-- *** NAVBAR BEGIN ***-->
<div class="isPC navbar-affixed-top" data-spy="affix" data-offset-top="200">
    <div class="policy-tip">
        <div>
            <span>{{ i18n "PRIVACY_TEXT" }}</span>
            <a href="{{ i18n "PRIVACY_LINK" }}">{{ i18n "PRIVACY_LINK_TEXT" }}></a>
            <img src="/img/icons/icon_close01.png" alt="" id="cookies-colse" />
        </div>
    </div>
    <div class="navbar navbar-default yamm" role="navigation" id="navbar">

        <div class="container">
            <div class="navbar-header">
                {{ if eq .Site.LanguageCode "zh-cn"}}
                <a class="navbar-brand home" href="{{ "/zh-cn" | relURL }}">
                {{ else }}
                <a class="navbar-brand home" href="{{ "/" | relURL }}">
                {{ end }}
                <img src="{{ .Site.Params.logo | relURL }}" alt="{{ .Title }} logo" class="hidden-xs hidden-sm">
                <img src="{{ .Site.Params.logo | relURL }}" alt="{{ .Title }} logo" class="visible-xs visible-sm">
                <span class="sr-only">{{ .Title }} - {{ i18n "navHome" }}</span>
                </a>

                <div class="navbar-buttons">
                    <a type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navigation">
                        <span class="sr-only">{{ i18n "navToggle" }}</span>
                        <svg class="search-img" width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
                            <title>Menu_Black</title>
                            <g id="Menu_Black" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
                                <rect id="Rectangle" fill="#000000" opacity="0" x="0" y="0" width="18" height="18"></rect>
                                <g id="menu" transform="translate(2.000000, 1.000000)" fill="#000000">
                                    <rect id="Rectangle" x="0" y="0.8" width="16" height="1.5"></rect>
                                    <rect id="Rectangle" x="0" y="7.7" width="16" height="1.5"></rect>
                                    <rect id="Rectangle" x="0" y="14.5" width="16" height="1.5"></rect>
                                </g>
                            </g>
                        </svg>
                        <svg class="search-img mobile" width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
                            <title>Menu_Green</title>
                            <g id="Menu_Green" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
                                <rect id="Rectangle" fill="#000000" opacity="0" x="0" y="0" width="18" height="18"></rect>
                                <g id="menu" transform="translate(2.000000, 1.000000)" fill="#5A9B83">
                                    <rect id="Rectangle" x="0" y="0.8" width="16" height="1.5"></rect>
                                    <rect id="Rectangle" x="0" y="7.7" width="16" height="1.5"></rect>
                                    <rect id="Rectangle" x="0" y="14.5" width="16" height="1.5"></rect>
                                </g>
                            </g>
                        </svg>
                    </a>
                </div>

            </div>
            <!--/.navbar-header -->

            <div class="navbar-collapse collapse fontHuaweiSans" id="navigation">
                <div class="collapse clearfix" id="search">
                </div>
                <ul class="nav navbar-nav navbar-right">
                    {{ $current := . }}
                    {{ range .Site.Menus.main }}
                    {{ $topLevel := replace .URL "/" "" }}
                    <li class="dropdown{{ if eq $current.RelPermalink .URL | or (eq $current.Type $topLevel) | or (and (eq (default (trim .URL "/") .Identifier) "blog") (in (slice "taxonomy" "taxonomyTerm") $current.Kind)) }} active{{ end }} {{ if eq .Identifier "lang" }}lang{{ end }}">
                    {{ if .HasChildren }}
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{{ .Name }}
                    </a>
                    <ul class="dropdown-menu">
                        <div class="dropdown-arrow"></div>
                        {{ range .Children }}
                        <li>
                            {{ if eq .Name "Gitee" }}
                              <a href="{{ .URL }}" target="_blank">{{ .Name }}</a>
                            {{ else if eq .Name "GitHub"}}
                              <a href="{{ .URL }}" target="_blank">{{ .Name }}</a>
                            {{ else if eq .Identifier "datastat"}}
                              <a href="{{ .URL }}" target="_blank">{{ .Name }}</a>
                            {{ else }}
                              <a href="{{ .URL }}" >{{ .Name }}</a>
                            {{ end }}
                        </li>
                        {{ end }}
                    </ul>
                    {{ else }}
                    {{ if eq .Identifier "lang"}}
                    <a href="javascript:;" class="nav-lang-btn">{{ .Name }}</a>
                    {{ else}}
                    <a href="{{ .URL }}">{{ .Name }}</a>
                    {{end}}
                    {{ end  }}
                    </li>
                    {{ end }}
                    <li class="dropdown nav-search">
                        <a href="javascript:;" class="dropdown-toggle fas fa-search data-toggle='dropdown' role='button' ">
                            <img class="fas fa-search search-img" src="{{ "img/icons/Search_Black.svg" | relURL }}" alt="">
                        </a>
                    </li>
                    <li class="dropdown nav-search-input">

                        <div class="book-search">

                            <input type="text" id="book-search-input" placeholder="{{ i18n "SEARCH" }}" aria-label="{{ i18n "SEARCH" }}" maxlength="64" data-hotkeys="/" />
                            <a href="javascript:;" class="book-search-spinner dropdown-toggle data-toggle='dropdown' role='button' ">
                                <i class="fas fa-search">
                                    <svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
                                        <title>Search_Grey</title>
                                        <g id="Search_Grey" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
                                            <rect id="Rectangle" fill="#000000" opacity="0" x="0" y="0" width="18" height="18"></rect>
                                            <g id="Group" transform="translate(4.000000, 2.500000)" stroke="#BFBFBF" stroke-width="1.5">
                                                <circle id="Oval" cx="6" cy="6" r="6"></circle>
                                                <line x1="12" y1="13.8" x2="9.5" y2="11" id="Stroke-3" stroke-linecap="round" stroke-linejoin="round"></line>
                                            </g>
                                        </g>
                                    </svg>
                                </i>
                            </a>
                            <ul id="book-search-results"></ul>
                        </div>
                    </li>
                </ul>
            </div>
            <!--/.nav-collapse -->
        </div>
    </div>
    <!-- /#navbar -->

</div>
<!-- *** NAVBAR END ***-->
